home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 August: Tool Chest / Apple_Developer_Group_August_1996_Tool_Chest.iso / Sample Code / Snippets / Toolbox / Sys7 popUpCDEF / SimplePopupCDEF.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-12  |  1.9 KB  |  54 lines  |  [TEXT/MPS ]

  1. #include <Types.h>
  2. #include <memory.h>
  3. #include <Packages.h>
  4. #include <Errors.h>
  5. #include <quickdraw.h>
  6. #include <fonts.h>
  7. #include <dialogs.h>
  8. #include <windows.h>
  9. #include <menus.h>
  10. #include <events.h>
  11. #include <OSEvents.h>
  12. #include <Desk.h>
  13. #include <diskinit.h>
  14. #include <OSUtils.h>
  15. #include <resources.h>
  16. #include <toolutils.h>
  17. #include <AppleEvents.h>
  18. #include <EPPC.h>
  19. #include <GestaltEqu.h>
  20. #include <PPCToolbox.h> 
  21. #include <Processes.h>
  22. #include <Balloons.h>
  23. #include <aliases.h>
  24. /* windowControl is the structure attached to every window I create (in the refCon */
  25. /* field) that contains all the information I need to know about the window. */
  26. /* data, procedure pointers for controlling, and anything else gets put in this */
  27. /* struct.  That makes my windows autonomous */
  28. struct windowControl {
  29.     unsigned long windowID;                                 /* master ID number  */
  30.     ProcPtr drawMe;                                         /* content drawing procedure pointer */
  31.     ProcPtr clickMe;                                        /* content click routine */
  32.     ProcPtr closeMe;                                        /* document close procedure pointer */
  33.     ProcPtr sizeMe;                                            /* size procedure */
  34.     AliasHandle fileAliasHandle;                            /* alias for this document */
  35.     Boolean windowDirty;
  36.     Handle generalData;                                        /* cast to whatever you need as you need it */
  37. };
  38. typedef struct windowControl windowControl, *windowCPtr, **windowCHandle;
  39.  
  40. enum {kDocWindowResID = 128,kMyDocumentWindow = 1000};
  41. /* menu enums */
  42. enum {kMBarID = 128};
  43. enum {kAppleMenu = 128,kFileMenu,kEditMenu,kToolsMenu};
  44.  
  45. /* file menu enums */
  46. enum {kNewItem = 1,kOpenItem,kCloseItem,kSaveItem,kSaveAsItem,kFileBlank1,kPageSetupItem,kPrintItem,kFileBlank2,kQuitItem};
  47.  
  48. /* general purpose enums */
  49. enum {kResumeMask=1,kSampHelp=129,kAboutBox=128,kHelpString=128,kBadSystem=130};
  50.  
  51. enum {kMinHeight = 200};
  52.  
  53. enum {kGeneralStrings = 128};
  54. enum {kSayLastItem = 1};